package cn.yerly.sakura.dao.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
/**
 * 订单物流
 * @author yerly
 *
 */
@Entity
public class OrderShipping {
	@Id
	private Long id;
	@ManyToOne
	private User user;
	@ManyToOne
	@JoinColumn(name="order_id")
	private Order order;
	@ManyToOne
	private ExpressCompany expressCompany;
	private String expressNumber;
	private Integer state;
	private Date ctime;
	private Boolean disabled;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	public ExpressCompany getExpressCompany() {
		return expressCompany;
	}

	public void setExpressCompany(ExpressCompany expressCompany) {
		this.expressCompany = expressCompany;
	}

	public String getExpressNumber() {
		return expressNumber;
	}

	public void setExpressNumber(String expressNumber) {
		this.expressNumber = expressNumber;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Date getCtime() {
		return ctime;
	}

	public void setCtime(Date ctime) {
		this.ctime = ctime;
	}

	public Boolean getDisabled() {
		return disabled;
	}

	public void setDisabled(Boolean disabled) {
		this.disabled = disabled;
	}

	@Override
	public String toString() {
		return "OrderExpress [id=" + id + ", user=" + user + ", order=" + order
				+ ", expressCompany=" + expressCompany + ", expressNumber="
				+ expressNumber + ", state=" + state + ", ctime=" + ctime
				+ ", disabled=" + disabled + "]";
	}

}
